#!/bin/bash
echo "启动节点服务模块..."
echo "[sftp_manage]"
pid_count_1=`ps -ef | grep -v grep | grep sftp_manage.py | awk '{print $2}' | wc -l`
if [ $pid_count_1 -gt 0 ]; then
    echo "已存在运行中的sftp_manage进程，进程信息如下:"
    ps -ef | grep -v grep | grep sftp_manage.py
else
    echo "sftp_manage进程正在启动..."
    nohup python3 sftp_manage.py -p 8086 > ./logs/sftp_manage.log 2>&1 &
    echo "sftp_manage进程已成功启动"
fi
echo "[encrypt_manage]"
pid_count_2=`ps -ef | grep -v grep | grep encrypt_manage.py | awk '{print $2}' | wc -l`
if [ $pid_count_2 -gt 0 ]; then
    echo "已存在运行中的encrypt_manage进程，进程信息如下:"
    ps -ef | grep -v grep | grep encrypt_manage.py
else
    echo "encrypt_manage进程正在启动..."
    nohup python3 encrypt_manage.py -p 8088 > ./logs/encrypt_manage.log 2>&1 &
    echo "encrypt_manage进程已成功启动"
fi
